Skip to content

Contact-Based Routing (CBR) - #45

Open
SujataPal wants to merge 2 commits into
akeranen:masterfrom
SujataPal:master
Open

Contact-Based Routing (CBR)#45
SujataPal wants to merge 2 commits into
akeranen:masterfrom
SujataPal:master

Conversation

@SujataPal

Copy link
Copy Markdown

Hi,
I would like to contribute the code for CBR.

@julianofischer

Copy link
Copy Markdown
Contributor

Very nice, congratulations!
ASAP I will read this code.
I think @akeranen and @tk721 will consider adding it to the code after a review.

@SujataPal

SujataPal commented Mar 12, 2017 via email

Copy link
Copy Markdown
Author

@akeranen akeranen left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some style issues, but otherwise OK

Comment thread src/routing/CBR.java Outdated
@Override
public void update() {
super.update();
//if(SimClock.getIntTime() == 43200)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to clean up the code before merging. And there's actually the core.Debug.p method for debug prints.

Comment thread src/routing/CBR.java Outdated
public void update() {
super.update();
//if(SimClock.getIntTime() == 43200)
//System.out.println("[" + this.getHost() + "] list: " + this.nodesInf + "\n");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment thread src/routing/CBR.java Outdated
ArrayList<Integer> items = otherRouter.nodesInf.get(msgDst.getAddress());

int encounter = items.get(0);
if (encounter > maxEnc)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style issue: opening curly brackets on the same line in ifs
(also below)

@julianofischer

Copy link
Copy Markdown
Contributor

Hi @SujataPal, maybe you would like to comment your source code. Would be nice!

@julianofischer

Copy link
Copy Markdown
Contributor

I think renaming CBR.java to CBRRouter.java is a good idea since all routing classes are named following this rule.

@SujataPal

Copy link
Copy Markdown
Author

Hi Ari/Juliano,

I have changed the code according to your suggestion and renamed CBR.java to CBRRouter.java as per Juliano.

Thank you,
Sujata

@SujataPal SujataPal changed the title Add code for Contact-Based Routing (CBR) Contact-Based Routing (CBR) Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants